<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
	<head>
		<!--加载header文件-->
		<?php
		include_once 'public/views/header.php';
		?>
		<?php
		include_once 'public/home/html/faltSelect.php';
		include_once 'public/home/html/laydate.php';
		?>
		<link rel="stylesheet" href="public/css/edit.css" />
		<script src="cust/js/journalEdit.js"></script>
		<script src="cust/js/goodsUpload.js"></script>
		<script src="public/js/cus_modal.js"></script>
	</head>
	<body>
		<div class="container">
			<div class="row">
				<input type="hidden" id="modal_title" value="<?=$title ?>" />
				<input type="hidden" id="modal_height" value="450" />
				<form id="editForm">
					<!-- <input type="hidden" id="id" name="id" value="<?=$id ?>" /> -->
					<input type="hidden" id="id" name="id" value="<?=estr($detail, 'id') ?>" />
					<table class='edit_table'>
						<tr>	
							<th class="required">刊物名称</th>
							<td>
								<input type="text" name="name" id="name"  value="<?=estr($detail, 'name') ?>" dataType="*" style="width: 90%;" />
							</td>																							
							<th class="required">刊物级别</th>					
							<td>
								<select style="width:100px" class="type"  name="type" id ="type" dataType="*">
								
									<!-- <option value="" id ="selected" hidden="true"><?=estr($detail, 'type') ?></option> -->
								<?php if (!(isset($detail['type']))) : ?>
									<option value="-1">请选择级别</option>
								<?php endif ; ?>						
									<option id="1" value="<?= JournalLevel::First[XPHEnum::Value] ?>">浙大一级</option>
									<option id="2" value="<?= JournalLevel::Second[XPHEnum::Value] ?>">浙大核心</option>
									<option id="3" value="<?= JournalLevel::Third[XPHEnum::Value] ?>">北大核心</option>
									<option id="4" value="<?= JournalLevel::Fourth[XPHEnum::Value] ?>">其他</option>
									<option value="-1" id ="selected" hidden="true"><?=estr($detail, 'type') ?></option>
								</select>
							</td>												
						</tr>

						<tr>	
							<th class="required">开始时间</th>
							<td>
								<input type="text" name="start_time" id="start_time"  value="<?=estr($detail, 'start_time') ?>" dataType="*" style="width: 90%;" />
							</td>
							<th class="required">结束时间</th>
							<td>
								<input type="text" name="end_time" id="end_time"  value="<?=estr($detail, 'end_time') ?>"  style="width: 90%;" />
							</td>						
							
						</tr>
																			
					</table>
				</form>
				<div class="viewContent">
					<!--这是显示具体车辆信息情况的。-->
				</div>
			</div>
		</div>
	</body>
	<script>
		var selected = $('#selected').text();
		if(selected==1){
			$('#1 ').attr("selected",true);
		}
		if(selected==2){
			$('#2 ').attr("selected",true);
		}
		if(selected==3){
			$('#3').attr("selected",true);
		}
		if(selected==4){
			$('#4').attr("selected",true);
		}
	
		console.log(selected);

		function addRole(){
			$('.sub-role-td').append($('.role-demo').html());
		}
		function delRole(obj){
			$(obj).next().remove();
			$(obj).prev().remove();
			$(obj).remove();
		}
	</script>


	<script type="text/javascript">
	
	    $(".sumbit").on("click",function(){
	    	console.log($("form").serialize())
	    })


</script>
</html>
